﻿@model Orion.Models.Adverty

@{
    ViewBag.Title = "IRIS - Innranet - Búa til auglýsingu";
    Layout = "~/Views/Shared/_WorkLayout.cshtml";
}
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/cupertino/jquery-ui.css" type="text/css" rel="Stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DateTimePicker.js")" type="text/javascript"></script>

<section id="main_content_wrapper">

<h1>Stofna auglýsingu</h1>

@{ Html.EnableClientValidation(); }

@using (Html.BeginForm("Create", "Advertiesment", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Auglýsing</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title, "Titill")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TextBody, "Lýsing")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.TextBody)
            @Html.ValidationMessageFor(model => model.TextBody)
        </div>

        <img src="/Content/AdvertiesMyndir/@Model.Picture" alt="mynd af notanda" />

        <div class="editor-label">
            <label for="file">Velja Mynd</label>
        </div>
            <div class="editor-field">
            <input type="file" name="file" id="file" />
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StartDate, "Upphaf birtingar")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StartDate)
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EndDate, "Lok birtingar")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EndDate)
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Valid, "Virk")
        </div>
        <div class="editor-field">
            <select id="Valid" name="Valid">
                <option value="true">Já</option>
                <option value="false">Nei</option>
            </select>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ClientName, "Auglýsandi")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ClientName)
            @Html.ValidationMessageFor(model => model.ClientName)
        </div>

        <p>
            <input type="submit" value="Vista" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Til Baka", "Index")
</div>

</section>